package jmine.tec.scheduling.quartz;

import java.util.ArrayList;
import java.util.List;

import jmine.tec.scheduling.ScheduledJobExecutionContext;
import bancosys.tec.exception.LocalizedMessageHolder;

/**
 * Execution context for scheduled jobs triggered by quartz
 * 
 * @author lundberg
 */
public class QuartzScheduledJobExecutionContext implements ScheduledJobExecutionContext {

    private List<String> executionLog = new ArrayList<String>();

    /**
     * {@inheritDoc}
     */
    public void log(LocalizedMessageHolder log) {
        this.executionLog.add(log.getMessage());
    }

    /**
     * Obtails all logged messages
     * 
     * @return execution log
     */
    public List<String> getExecutionLog() {
        return this.executionLog;
    }

}
